home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 2
/
SPACE - Library 2 - Volume 1.iso
/
games
/
73
/
pascal
/
rndtest.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1986-11-21
|
2KB
|
58 lines
{ -----------------------------------------------------------------------------
NOTICE:
THESE MATERIALS are UNSUPPORTED by OSS! If you do not understand how to
use them do not contact OSS for help! We will not teach you how to
program in Pascal. If you find an error in these materials, feel free
to SEND US A LETTER explaining the error, and how to fix it.
THE BOTTOM LINE:
Use it, enjoy it, but you are on your own when using these materials!
DISCLAIMER:
OSS makes no representations or warranties with respect to the contents
hereof and specifically disclaim all warranties of merchantability or
fitness for any particular purpose. This document is subject to change
without notice.
OSS provides these materials for use with Personal Pascal. Use them in
any way you wish.
-------------------------------------------------------------------------- }
PROGRAM Test_Random;
{***************************************************************************
Program to test random number functions in Personal Pascal.
October 1, 1986 MJC
Copyright 1986 OSS
>> Compile for TOS!! <<
*****************************************************************************}
VAR
i : Integer;
DecRand : Real;
IntRand : Integer;
{$I RANDOM.PAS} { include random routines }
Begin
For i := 1 to 100 do
Begin
DecRand := Rnd; { grab number tween 0 and 1 }
IntRand := Random( 5, 10 ); { grab random int between 5 and 10 }
Writeln( 'DecRand is ', DecRand:10:8, ' IntRand is ', IntRand );
End;
End.
{ END OF RNDTEST.PAS }